import axios from "~/axios"
import { queryFilters } from "~/composables/util"

// 获取用户注册信息
export function getGroups({ ...data }) {
    let r
    if(data != {}){
        r = queryFilters(data)
    }else{
        r = ''
    }
    
    return axios.get(`/user/group/${r}`)
}


// 新增用户注册信息
export function postGroups(data) {
    return axios.post(`/user/group/`, data)
}

// 修改用户注册信息
export function putGroups(id, data) {
    return axios.put(`/user/group/${id}/`, data)
}

// 删除用户注册信息
export function deleteGroups(id) {
    return axios.delete(`/user/group/${id}/`)
}